﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooCoreCommonQualityManagerWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Core.Common.QualityManager);
			Utils.BeginObjectRegister(type, L, translator, 0, 6, 6, 3);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetQualityAdjusterSetting", _m_GetQualityAdjusterSetting);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetQualityAdjusterLimit", _m_GetQualityAdjusterLimit);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitQualitySetting", _m_InitQualitySetting);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ApplyQualitySetting", _m_ApplyQualitySetting);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddQualityListener", _m_AddQualityListener);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveQualityListener", _m_RemoveQualityListener);
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "QualityListeners", _g_get_QualityListeners);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "CurrentQuality", _g_get_CurrentQuality);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "QualityValue", _g_get_QualityValue);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "adjusterSettings", _g_get_adjusterSettings);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentAdjusterSetting", _g_get_currentAdjusterSetting);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Inited", _g_get_Inited);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "adjusterSettings", _s_set_adjusterSettings);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "currentAdjusterSetting", _s_set_currentAdjusterSetting);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "Inited", _s_set_Inited);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 1, 1);
			
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Inst", _g_get_Inst);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "Inst", _s_set_Inst);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Core.Common.QualityManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Core.Common.QualityManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetQualityAdjusterSetting(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _quality = LuaAPI.xlua_tointeger(L, 2);
                    
                        var gen_ret = gen_to_be_invoked.GetQualityAdjusterSetting( _quality );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetQualityAdjusterLimit(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _quality = LuaAPI.xlua_tointeger(L, 2);
                    
                        var gen_ret = gen_to_be_invoked.GetQualityAdjusterLimit( _quality );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_InitQualitySetting(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    int _quality = LuaAPI.xlua_tointeger(L, 2);
                    
                    gen_to_be_invoked.InitQualitySetting( _quality );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Mars.Got.QualityEnum>(L, 2)) 
                {
                    Yoozoo.Mars.Got.QualityEnum _quality;translator.Get(L, 2, out _quality);
                    
                    gen_to_be_invoked.InitQualitySetting( _quality );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager.InitQualitySetting!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ApplyQualitySetting(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) 
                {
                    bool _changeQuality = LuaAPI.lua_toboolean(L, 2);
                    
                    gen_to_be_invoked.ApplyQualitySetting( _changeQuality );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.ApplyQualitySetting(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager.ApplyQualitySetting!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddQualityListener(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Core.Common.QualityListenerMono>(L, 2)) 
                {
                    Yoozoo.Core.Common.QualityListenerMono _listenerMono = (Yoozoo.Core.Common.QualityListenerMono)translator.GetObject(L, 2, typeof(Yoozoo.Core.Common.QualityListenerMono));
                    
                    gen_to_be_invoked.AddQualityListener( _listenerMono );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Core.Common.IQualityListener>(L, 2)) 
                {
                    Yoozoo.Core.Common.IQualityListener _listener = (Yoozoo.Core.Common.IQualityListener)translator.GetObject(L, 2, typeof(Yoozoo.Core.Common.IQualityListener));
                    
                    gen_to_be_invoked.AddQualityListener( _listener );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager.AddQualityListener!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemoveQualityListener(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Core.Common.QualityListenerMono>(L, 2)) 
                {
                    Yoozoo.Core.Common.QualityListenerMono _listenerMono = (Yoozoo.Core.Common.QualityListenerMono)translator.GetObject(L, 2, typeof(Yoozoo.Core.Common.QualityListenerMono));
                    
                    gen_to_be_invoked.RemoveQualityListener( _listenerMono );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Core.Common.IQualityListener>(L, 2)) 
                {
                    Yoozoo.Core.Common.IQualityListener _listener = (Yoozoo.Core.Common.IQualityListener)translator.GetObject(L, 2, typeof(Yoozoo.Core.Common.IQualityListener));
                    
                    gen_to_be_invoked.RemoveQualityListener( _listener );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.QualityManager.RemoveQualityListener!");
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_QualityListeners(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.QualityListeners);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_CurrentQuality(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                translator.PushYoozooMarsGotQualityEnum(L, gen_to_be_invoked.CurrentQuality);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_QualityValue(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.QualityValue);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Inst(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Core.Common.QualityManager.Inst);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_adjusterSettings(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.adjusterSettings);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_currentAdjusterSetting(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.currentAdjusterSetting);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Inited(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.Inited);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_Inst(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    Yoozoo.Core.Common.QualityManager.Inst = (Yoozoo.Core.Common.QualityManager)translator.GetObject(L, 1, typeof(Yoozoo.Core.Common.QualityManager));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_adjusterSettings(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.adjusterSettings = (System.Collections.Generic.List<Yoozoo.Core.Common.QualityAdjusterSetting>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<Yoozoo.Core.Common.QualityAdjusterSetting>));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_currentAdjusterSetting(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.currentAdjusterSetting = (Yoozoo.Core.Common.QualityAdjusterSetting)translator.GetObject(L, 2, typeof(Yoozoo.Core.Common.QualityAdjusterSetting));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_Inited(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Core.Common.QualityManager gen_to_be_invoked = (Yoozoo.Core.Common.QualityManager)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.Inited = LuaAPI.lua_toboolean(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
